package com.songcan.common.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.awt.*;
import java.util.List;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class MenuVo {

    private Long id;

    private Boolean alwaysShow;

    private List<MenuVo> children;

    private String code;

    private Long parentId;

    private String component;

    private Boolean hidden;

    private String name;

    private String path;

    private Meta meta;

    private String redirect;

    private String role;

    private String scope;

    private String url;

    private String method;

    @Data
    public static class Meta{
        private String icon;

        private String title;
    }

    public void add(MenuVo node) {
        children.add(node);
    }


//    private Long id;
//    private Long parentId; //父级id
//    private String code;
//    private String name;
//    private String alias;
//    private String path;
//    private String source;
//    private Integer category;
//    private Integer action; //是否开启
//    private List<MenuVo> children;
//    private Integer sortNo;
//    private Integer type;
//    private String icon;
//    private String method;
//    private String function;
//    private String role;
//    private String scope;
//    private String url;
//    private String redirect;
//    private String component;
//
//

}
